#include "Timer.h"
#include "SenseToRadio.h"
#include "printf.h"

configuration SenseToRadioAppC 
{ 
} 

implementation { 

 #define CONFIG_AVCC 

  components SenseToRadioC;
  components MainC;
  components LedsC;
  components PrintfC;
  components SerialStartC;
  components new TimerMilliC() as WakeupTimer;

  SenseToRadioC.Boot -> MainC;
  SenseToRadioC.Leds -> LedsC;
  SenseToRadioC.WakeupTimer -> WakeupTimer;

  
  components HplMsp430GeneralIOC;
  SenseToRadioC.SBcontrol -> HplMsp430GeneralIOC.Port23;
  
  // --------- ADC related ---------
  components new SBT80_ADCconfigC() as ACCMGx;

  SenseToRadioC.ReadACC	-> ACCMGx.ReadADC0;

  // --------- Message related ---------
  components ActiveMessageC;
  components new AMSenderC(AM_SENSETORADIOMSG);

  SenseToRadioC.Packet -> AMSenderC;
  SenseToRadioC.AMPacket -> AMSenderC;
  SenseToRadioC.AMSend -> AMSenderC;
  SenseToRadioC.AMControl -> ActiveMessageC;
}
